Skip to main content

Function: useOrders()

useOrders(params?): QueryResult<"orders", Order[]>

Get orders

Parameters

params? = {}

No required parameters.

params.address?: string

Filter based on the blockchain address associated with the order.

params.memo?: string

Filter by the payment memo/reference..

params.profile?: string

Filter based on the profile ID associated with the order.

params.query?: QueryOptions<Order[]> = {}

See Tanstack Query - useQuery options.

params.state?: OrderState

Filter based on the state of the order.

params.txHash?: string

Filter based on the blockchain transaction hash.

Returns

QueryResult<"orders", Order[]>

Example

const {
orders, // useQuery's `data` property
isLoading,
isError,
error,
refetch,
...moreUseQueryResults
} = useOrders();

See

API Documentation

Order interface

Defined in

hooks.tsx:449